﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="MyProfiles.aspx.cs" Inherits="MyProfiles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <link href="js/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.validationEngine.js" type="text/javascript"></script>
    <script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
    <link href="css/jchartfx.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="jquery/jRating.jquery.css" type="text/css" />
    <script type="text/javascript" src="jquery/jRating.jquery.js"></script>
    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jchartfx.system.js"></script>
    <script type="text/javascript" src="js/jchartfx.coreBasic.js"></script>
    <script src="js/jchartfx.coreVector.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jchartfx.advanced.js"></script>
    <script src="js/jchartfx.animation.js" type="text/javascript"></script>
    <script src="js/jchartfx.annotation.js" type="text/javascript"></script>
    <link href="jquery/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="js/jquery-ui.js" type="text/javascript"></script>
    <script src="js/Recipes.js" type="text/javascript"></script>
   
    <script type="text/javascript">
        $(document).ready(function () {
            $("#content1").hide();
            $("#content2").hide();
            $("#content3").hide();
            $("#content4").hide();
            var Check = 'Food';
            var StatusGoals = 'false';
            var CalorieValue = '';
            var CarbValue = '';
            var FatValue = '';
            var ProteinValue = '';
            var WeightValue = '';
            var RecipeID = '';
            var $datepicker = $(".datepicker");
            $datepicker.datepicker();
            $.datepicker.setDefaults({ dateFormat: 'D, M d, yy' });
            $datepicker.datepicker('setDate', new Date());

            $('.Next').click(function () {
                var nextdate = $('.datepicker').datepicker('getDate', +1);
                nextdate.setDate(nextdate.getDate() + 1);
                $('.datepicker').datepicker('setDate', nextdate);
                var now = new Date($('#datepicker').val());
                var Month = now.getMonth();
                var Day = now.getDate();
                var Year = now.getFullYear();
                if (Check == 'Food') {
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {

                    $("#ChartDiv1").empty();
                    loadReportExercise();

                }
                else if (Check == 'Weight') {
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                ShowMainReport();
            });

            $('.Back').click(function () {
                var backdate = $('.datepicker').datepicker('getDate', -1);
                backdate.setDate(backdate.getDate() - 1);
                $('.datepicker').datepicker('setDate', backdate);
                var now = new Date($('#datepicker').val());
                var Month = now.getMonth();
                var Day = now.getDate();
                var Year = now.getFullYear();
                if (Check == 'Food') {
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {

                    $("#ChartDiv1").empty();
                    loadReportExercise();

                }
                else if (Check == 'Weight') {
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                ShowMainReport();
            });

            $('#datepicker').datepicker(); // Initialise

            $('#datepicker').datepicker('option', {
                onClose: function () {
                    if (Check == 'Food') {
                        $("#ChartDiv1").empty();
                        loadReport1();
                    }
                    else if (Check == 'Exercise') {

                        $("#ChartDiv1").empty();
                        loadReportExercise();

                    }
                    else if (Check == 'Weight') {
                        $("#ChartDiv1").empty();
                        loadReportWeight();
                    }
                    ShowMainReport();
                }
            });

            ShowMainReport();

            loadReport1();

            $(function () {
                $(".datepicker").datepicker();
            });

            BindGrahpSuggestion('<%=Session["Userid"]%>');


            $('.txtWeightLbs').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtExerciseCal').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtQuantity').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if (event.which < 48 || event.which > 57) {
                    event.preventDefault();
                }
            });

            $('.txtMyCALORIES').keypress(function (event) {


                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyFAT').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyPROTEIN').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyCARB').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtMYExercise').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtMyWeight').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.food3').attr('src', 'images/food4.png');
            $('.running3').attr('src', 'images/runing3.png');
            $('.weight3').attr('src', 'images/weight3.png');

            var colorOrig = $(".Food").css('background-color');
            var colorGoalOrig = $(".txExerciseGoals").css('background-color');
            $("#idFood").css('background-color', '#375D10');
            $(".lblFood").css('color', '#ffffff');
            $(".txtCalGoals").css('color', '#ffffff');
            $(".txtFatGoals").css('color', '#ffffff');
            $(".txtCarbGoals").css('color', '#ffffff');
            $(".txtProteinGoals").css('color', '#ffffff');
            $(".txtMyIntakeCal").css('color', '#ffffff');
            $(".txtMyIntakeFat").css('color', '#ffffff');
            $(".txtMyIntakeCarb").css('color', '#ffffff');
            $(".txtMyIntakeProtein").css('color', '#ffffff');

            $(".txtCalGoals").css('background-color', '#375D10');
            $(".txtFatGoals").css('background-color', '#375D10');
            $(".txtCarbGoals").css('background-color', '#375D10');
            $(".txtProteinGoals").css('background-color', '#375D10');
            $(".txtMyIntakeCal").css('background-color', '#375D10');
            $(".txtMyIntakeFat").css('background-color', '#375D10');
            $(".txtMyIntakeCarb").css('background-color', '#375D10');
            $(".txtMyIntakeProtein").css('background-color', '#375D10');
            $(".Food").click(function () {
                Check = 'Food';
                $('.food3').attr('src', 'images/food4.png');
                $('.running3').attr('src', 'images/runing3.png');
                $('.weight3').attr('src', 'images/weight3.png');

                $(this).css('background-color', '#375D10');
                $(".Weight").css('background-color', colorOrig);
                $(".Exercise").css('background-color', colorOrig);
                $(".lblFood").css('color', '#ffffff');
                $(".lblWeight").css('color', "#000000");
                $(".lblExercise").css('color', "#000000");
                $(".txWeightGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeWeight").css('background-color', colorGoalOrig);
                $(".txExerciseGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeExercise").css('background-color', colorGoalOrig);
                $(".txExerciseGoals").css('color', '#000000');
                $(".txtMyIntakeExercise").css('color', '#000000');
                $(".txWeightGoals").css('color', '#000000');
                $(".txtMyIntakeWeight").css('color', '#000000');

                $(".txtCalGoals").css('color', '#ffffff');
                $(".txtFatGoals").css('color', '#ffffff');
                $(".txtCarbGoals").css('color', '#ffffff');
                $(".txtProteinGoals").css('color', '#ffffff');
                $(".txtMyIntakeCal").css('color', '#ffffff');
                $(".txtMyIntakeFat").css('color', '#ffffff');
                $(".txtMyIntakeCarb").css('color', '#ffffff');
                $(".txtMyIntakeProtein").css('color', '#ffffff');

                $(".txtCalGoals").css('background-color', '#375D10');
                $(".txtFatGoals").css('background-color', '#375D10');
                $(".txtCarbGoals").css('background-color', '#375D10');
                $(".txtProteinGoals").css('background-color', '#375D10');
                $(".txtMyIntakeCal").css('background-color', '#375D10');
                $(".txtMyIntakeFat").css('background-color', '#375D10');
                $(".txtMyIntakeCarb").css('background-color', '#375D10');
                $(".txtMyIntakeProtein").css('background-color', '#375D10');

                $("#ChartDiv1").empty();
                loadReport1();
            });

            $(".Exercise").click(function () {
                // $("#btnEnter").prop('value', 'Enter your exercise');
                Check = 'Exercise';
                $('.food3').attr('src', 'images/food3.png');
                $('.running3').attr('src', 'images/runing4.png');
                $('.weight3').attr('src', 'images/weight3.png');
                $(this).css('background-color', '#375D10');
                $(".Food").css('background-color', colorOrig);
                $(".Weight").css('background-color', colorOrig);
                $(".lblFood").css('color', '#000000');
                $(".lblWeight").css('color', "#000000");
                $(".lblExercise").css('color', "#ffffff");
                $(".txExerciseGoals").css('background-color', '#375D10');
                $(".txtMyIntakeExercise").css('background-color', '#375D10');
                $(".txExerciseGoals").css('color', '#ffffff');
                $(".txtMyIntakeExercise").css('color', '#ffffff');
                $(".txWeightGoals").css('color', '#000000');
                $(".txtMyIntakeWeight").css('color', '#000000');
                $(".txWeightGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeWeight").css('background-color', colorGoalOrig);

                $(".txtCalGoals").css('color', '#000000');
                $(".txtFatGoals").css('color', '#000000');
                $(".txtCarbGoals").css('color', '#000000');
                $(".txtProteinGoals").css('color', '#000000');
                $(".txtMyIntakeCal").css('color', '#000000');
                $(".txtMyIntakeFat").css('color', '#000000');
                $(".txtMyIntakeCarb").css('color', '#000000');
                $(".txtMyIntakeProtein").css('color', '#000000');

                $(".txtCalGoals").css('background-color', colorGoalOrig);
                $(".txtFatGoals").css('background-color', colorGoalOrig);
                $(".txtCarbGoals").css('background-color', colorGoalOrig);
                $(".txtProteinGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCal").css('background-color', colorGoalOrig);
                $(".txtMyIntakeFat").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCarb").css('background-color', colorGoalOrig);
                $(".txtMyIntakeProtein").css('background-color', colorGoalOrig);
                $("#ChartDiv1").empty();

                loadReportExercise();
            });

            $(".Weight").click(function () {
                // $("#btnEnter").prop('value', 'Enter your weight');
                Check = 'Weight';
                $('.food3').attr('src', 'images/food3.png');
                $('.running3').attr('src', 'images/runing3.png');
                $('.weight3').attr('src', 'images/weight4.png');
                $(this).css('background-color', '#375D10');
                $(".Food").css('background-color', colorOrig);
                $(".Exercise").css('background-color', colorOrig);
                $(".lblFood").css('color', '#000000');
                $(".lblWeight").css('color', "#ffffff");
                $(".lblExercise").css('color', "#000000");
                $(".txWeightGoals").css('background-color', '#375D10');
                $(".txtMyIntakeWeight").css('background-color', '#375D10');
                $(".txWeightGoals").css('color', '#ffffff');
                $(".txtMyIntakeWeight").css('color', '#ffffff');
                $(".txExerciseGoals").css('color', '#000000');
                $(".txtMyIntakeExercise").css('color', '#000000');
                $(".txExerciseGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeExercise").css('background-color', colorGoalOrig);
                $(".txtCalGoals").css('color', '#000000');
                $(".txtFatGoals").css('color', '#000000');
                $(".txtCarbGoals").css('color', '#000000');
                $(".txtProteinGoals").css('color', '#000000');
                $(".txtMyIntakeCal").css('color', '#000000');
                $(".txtMyIntakeFat").css('color', '#000000');
                $(".txtMyIntakeCarb").css('color', '#000000');
                $(".txtMyIntakeProtein").css('color', '#000000');

                $(".txtCalGoals").css('background-color', colorGoalOrig);
                $(".txtFatGoals").css('background-color', colorGoalOrig);
                $(".txtCarbGoals").css('background-color', colorGoalOrig);
                $(".txtProteinGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCal").css('background-color', colorGoalOrig);
                $(".txtMyIntakeFat").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCarb").css('background-color', colorGoalOrig);
                $(".txtMyIntakeProtein").css('background-color', colorGoalOrig);

                $("#ChartDiv1").empty();
                loadReportWeight();
            });

            $('#idAddExercise').click(function () {
                InserReportExercises()
            });

            $('#idAddWeight').click(function () {
                InserReportWeights()
            });

            $('#idAddFoodDrink').click(function () {
                InsertReportFoodDrink(CalorieValue, FatValue, CarbValue, ProteinValue, RecipeID)
            });

            $('#btnMyGoals').click(function () {
                $(".EnterGoals").show();
                $(".Main").hide();
                var src = $('.btnMyGoals').attr('src');
                if (src == 'images/AddReports.png') {
                    $('.btnAddGoals').attr('src', 'images/AddReports.png');
                    $("#txtMyCALORIES").val($("#txtCalGoals").val());
                    $("#txtMyFAT").val($("#txtFatGoals").val());
                    $("#txtMyCARB").val($("#txtCarbGoals").val());
                    $("#txtMyPROTEIN").val($("#txtProteinGoals").val());
                    $("#txtMYExercise").val($("#txExerciseGoals").val());
                    $("#txtMyWeight").val($("#txWeightGoals").val());
                }
                else {
                    $('.btnAddGoals').attr('src', 'images/EditReports.png');
                    $("#txtMyCALORIES").val($("#txtCalGoals").val());
                    $("#txtMyFAT").val($("#txtFatGoals").val());
                    $("#txtMyCARB").val($("#txtCarbGoals").val());
                    $("#txtMyPROTEIN").val($("#txtProteinGoals").val());
                    $("#txtMYExercise").val($("#txExerciseGoals").val());
                    $("#txtMyWeight").val($("#txWeightGoals").val());
                }
                InitdeleteTextSearch();
            });
            $('.btnAddGoals').click(function () {
                var src = $('.btnAddGoals').attr('src');

                if (src == 'images/AddReports.png') {
                    InsertReportGoals();
                }
                else {

                    EditReportGoals();
                }
            });


            $('#btnMyEnter').click(function () {
                if (Check == 'Food') {
                    ListMyFoodIntake();
                    $(".EnterFoodInTakes").show();
                    $('#MainContent_txtFoodDrink').val('');
                    $('#MainContent_txtQuantity').val('');
                    $("#ddlUnit").empty();
                    InitdeleteTextSearch3();
                }
                else if (Check == 'Exercise') {
                    ListMyExercises();
                    $(".EnterExercise").show();
                    $('#MainContent_txtExerciseName').val('');
                    $('#MainContent_txtExerciseCal').val('');
                    InitdeleteTextSearch2();

                }
                else if (Check == 'Weight') {
                    ListMyWeight();
                    $(".EnterWeight").show();
                    $('#MainContent_txtWeightLbs').val('')
                    InitdeleteTextSearch1();
                }
                $(".Main").hide();
            });

            $('.alert-close-goals').on('click', function (c) {
                if ($("#txtMyCALORIES").val() == "") {
                    $("#txtMyCALORIES").focus();
                }
                else if ($("#txtMyFAT").val() == "") {
                    $("#txtMyFAT").focus();
                }
                else if ($("#txtMyCARB").val() == "") {
                    $("#txtMyCARB").focus();
                }
                else if ($("#txtMyPROTEIN").val() == "") {
                    $("#txtMyPROTEIN").focus();
                }
                else if ($("#txtMYExercise").val() == "") {
                    $("#txtMYExercise").focus();
                }
                else if ($("#txtMyWeight").val() == "") {
                    $("#txtMyWeight").focus();
                }
                else {
                    var src = $('.btnMyGoals').attr('src');

                    if (src == 'images/AddReports.png') {
                        $("#txtCalGoals ").val($("#txtMyCALORIES").val());
                        $("#txtFatGoals").val($("#txtMyFAT").val());
                        $("#txtCarbGoals").val($("#txtMyCARB").val());
                        $("#txtProteinGoals").val($("#txtMyPROTEIN").val());
                        $("#txExerciseGoals").val($("#txtMYExercise").val());
                        $("#txWeightGoals").val($("#txtMyWeight").val());
                        InsertReportGoals();
                    }
                    else {
                        $("#txtCalGoals ").val($("#txtMyCALORIES").val());
                        $("#txtFatGoals").val($("#txtMyFAT").val());
                        $("#txtCarbGoals").val($("#txtMyCARB").val());
                        $("#txtProteinGoals").val($("#txtMyPROTEIN").val());
                        $("#txExerciseGoals").val($("#txtMYExercise").val());
                        $("#txWeightGoals").val($("#txtMyWeight").val());
                        EditReportGoals();
                    }
                    $(".EnterGoals").hide();
                    $(".Main").show();

                    if (Check == 'Food') {
                        $("#ChartDiv1").empty();
                        loadReport1();
                    }
                    else if (Check == 'Exercise') {

                        $("#ChartDiv1").empty();
                        loadReportExercise();

                    }
                    else if (Check == 'Weight') {
                        $("#ChartDiv1").empty();
                        loadReportWeight();
                    }
                }
            });

            $('.alert-close').on('click', function (c) {

                if (Check == 'Food') {
                    $(".EnterFoodInTakes").hide();
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {
                    $(".EnterExercise").hide();
                    $("#ChartDiv1").empty();
                    loadReportExercise();
                }
                else if (Check == 'Weight') {
                    $(".EnterWeight").hide();
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                $(".Main").show();
                ShowMainReport();
            });
            //-----------Start suggestReport---------------------
            $(".suggestReport").autocomplete({
                close: function () {
                    var userid = '<%=Session["Userid"]%>';
                    var RecipeName = replaceAll("'", ",,", $("#<%=txtFoodDrink.ClientID%>").val());

                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/GetUnitReport",
                        data: "{'UserId':'" + userid + "','RecipeName':'" + RecipeName + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (result) {
                            var Unitreport = eval(result.d);
                            var options = '';
                            $.each(Unitreport, function () {
                                options += '<option>' + this.Msre_Desc + '</option>';

                            });
                            $("#ddlUnit").html(options);
                            $("#<%=txtQuantity.ClientID%>").val("1");
                            var UnitName = ($("#ddlUnit").val());
                            if ((RecipeName != '' || RecipeName != null) && (UnitName != '' || UnitName != null())) {
                                $.ajax({
                                    type: "POST",
                                    url: "PIMService.asmx/GetCurrentNutrient",
                                    data: "{'UserId':'" + userid + "','RecipeName':'" + RecipeName + "','UnitName':'" + UnitName + "'}",
                                    contentType: "application/json; charset=utf-8",
                                    dataType: "json",
                                    success: function (result1) {
                                        $.each(eval(result1.d), function () {

                                            CalorieValue = this.Cal;
                                            CarbValue = this.Carb;
                                            FatValue = this.Fat;
                                            ProteinValue = this.Protein;
                                            WeightValue = this.Weight;
                                            RecipeID = this.RecipeID;
                                        });
                                    },

                                    error: function (result) {

                                    }
                                });

                            }

                        },
                        error: function (result) {

                        }

                    });

                }
            });
            //-----------End suggestReport---------------------

        });

        //--------------------------Start Function ListMyExercises--------------------------------
        function ListMyExercises() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListEnterExercise > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyExercises",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListEnterExercise").append("<tr style='background-color:#A5A6A5;height:40px;font-weight:normal;'><td colspan='3' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>");
                            }
                            $("#idListEnterExercise").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;height:40px;font-weight:normal;'><td>" + data.d[i].ExerciseName + "</td><td>" + data.d[i].Cal +
                             "&nbsp;Cals</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="' + data.d[i].ExerciseName + '" src="images/DeleteReports.png" onclick="javascript:DeleteReportExercises(this)" class="trigger"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyExercises--------------------------------
        //--------------------------Start Function ListMyWeight--------------------------------
        function ListMyWeight() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListEnterWeight > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyWeight",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListEnterWeight").append("<tr style='background-color:#A5A6A5;height:40px;font-weight:normal;'><td colspan='2' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>");
                            }
                            $("#idListEnterWeight").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;height:40px;font-weight:normal;'><td>" + data.d[i].Weight +
                             "&nbsp;lbs</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="Weight ' + data.d[i].ID + '" src="images/DeleteReports.png" onclick="javascript:DeleteReportWeight(this)" class="trigger1"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyWeight--------------------------------
        //--------------------------Start Function ListMyFoodIntake--------------------------
        function ListMyFoodIntake() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListFoodIntake > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyFoodIntake",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListFoodIntake").append("<tr style='background-color:#A5A6A5;height:40px;font-weight:normal;'><td colspan='6' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>");
                            }
                            $("#idListFoodIntake").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;;height:40px;font-weight:normal;'><td>" + data.d[i].CalorieName +
                            "</td><td>&nbsp;&nbsp;" + data.d[i].Calorie + "</td><td>&nbsp;&nbsp;" + data.d[i].Fat + "</td><td>&nbsp;&nbsp;" + data.d[i].Carb + "</td><td>&nbsp;&nbsp;" + data.d[i].Protein +
                             "</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="' + data.d[i].CalorieName + '" src="images/DeleteReports.png" onclick="javascript:DelteReportFoodDrink(this)" class="trigger"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyFoodIntake-----------------------------
        //--------------------------Start Function loadReport1--------------------------
        function loadReport1() {
            var userid = '<%=Session["Userid"]%>';
            var a1 = new Array();
            var chart1;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReport2",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b1 = new Object();
                            b1.Name = this.Name;
                            b1.Calorie = this.Calorie;
                            b1.Carb = this.Carb;
                            b1.Fat = this.Fat;
                            b1.Protein = this.Protein;
                            a1.push(b1);
                        });
                        chart1 = new cfx.Chart();
                        chart1.getAnimations().getLoad().setEnabled(true);
                        chart1.setDataSource(a1);
                        var pane = new cfx.Pane();
                        chart1.getPanes().add(pane);
                        chart1.setGallery(cfx.Gallery.Lines);
                        chart1.getSeries().getItem(0).setPane(chart1.getPanes().getItem(1));
                        chart1.getSeries().getItem(1).setPane(chart1.getPanes().getItem(0));
                        chart1.getSeries().getItem(2).setPane(chart1.getPanes().getItem(0));
                        chart1.getSeries().getItem(3).setPane(chart1.getPanes().getItem(0));
                        chart1.getSeries().getItem(0).setGallery(cfx.Gallery.Bar);
                        chart1.getLegendBox().setVisible(true);
                        chart1.getLegendBox().setDock(cfx.DockArea.Top);
                        chart1.getLegendBox().setContentLayout(cfx.ContentLayout.Center);
                        chart1.getAxisX().setLabelAngle(90);
                        var chartDiv = document.getElementById('ChartDiv1');
                        chart1.create(chartDiv);
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function loadReport1--------------------------
        //--------------------------Start Function loadReportWeight--------------------------
        function loadReportWeight() {
            var userid = '<%=Session["Userid"]%>';
            var a4 = new Array();
            var chart4;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReportWeight",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b4 = new Object();
                            b4.Name = this.Name;
                            b4.YourWeight = this.YourWeight;
                            b4.Target = this.Target;
                            a4.push(b4);
                        });
                        chart4 = new cfx.Chart();
                        chart4.getAnimations().getLoad().setEnabled(true);
                        chart4.getAxisX().setLabelAngle(90);
                        chart4.setGallery(cfx.Gallery.Lines);
                        chart4.setDataSource(a4);
                        var divHolder3 = document.getElementById('ChartDiv1');
                        chart4.create(divHolder3);
                        chart4.getLegendBox().setDock(cfx.DockArea.Top);
                        chart4.getLegendBox().setContentLayout(cfx.ContentLayout.Center);
                        chart4.getSeries().getItem(0).setText("Your Weight");
                        chart4.getSeries().getItem(1).setText("Target");
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function loadReportWeight--------------------------
        //--------------------------Start Function loadReportExercise-----------------
        function loadReportExercise() {
            var userid = '<%=Session["Userid"]%>';
            var a3 = new Array();
            var chart3;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReportExercise",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b3 = new Object();
                            b3.Name = this.Name;
                            b3.YourExercise = this.YourExercise;
                            b3.Target = this.Target;
                            a3.push(b3);
                        });
                        chart3 = new cfx.Chart();
                        chart3.getAnimations().getLoad().setEnabled(true);
                        chart3.setGallery(cfx.Gallery.Lines);
                        chart3.getAxisX().setLabelAngle(90);
                        chart3.setDataSource(a3);
                        var divHolder3 = document.getElementById('ChartDiv1');
                        chart3.create(divHolder3);
                        chart3.getLegendBox().setDock(cfx.DockArea.Top);
                        chart3.getLegendBox().setContentLayout(cfx.ContentLayout.Center);
                        chart3.getSeries().getItem(0).setText("Your Exercise");
                        chart3.getSeries().getItem(1).setText("Target");
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------Start Function loadReportExercise-----------------
        //--------------------------Start Function InserReportExercises-----------------
        function InserReportExercises() {

            if ($("#<%=txtExerciseName.ClientID%>").val() == "") {
                $("#<%=txtExerciseName.ClientID%>").focus();
            }
            else if ($("#<%=txtExerciseCal.ClientID%>").val() == "") {
                $("#<%=txtExerciseCal.ClientID%>").focus();
            }
            else if ($("#datepickerExercise").val() == "") {
                $("#datepickerExercise").focus();
            }
            else {
                var userid = '<%=Session["Userid"]%>';
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InserReportExercises",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($("#datepickerExercise").val()) + "','_ExerciseName':'" + $("#<%=txtExerciseName.ClientID%>").val() + "','_Cal':'" + $("#<%=txtExerciseCal.ClientID%>").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ListMyExercises();
                        $("#<%=txtExerciseName.ClientID%>").val('');
                        $("#<%=txtExerciseCal.ClientID%>").val('');
                        //$("#datepickerExercise").val('');
                    },
                    error: function (result) {
                        alert('Can not create your exercise!');
                    }
                });
            }
        }
        //--------------------------End Function InserReportExercises-----------------
        //--------------------------Start Function DeleteReportExercises-----------------
        function DeleteReportExercises(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the exercise name: ' + name + '?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DeleteReportExercises",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyExercises();
                        },
                        error: function (msg) {
                            alert('Can not delete your exercise!');
                        }
                    });
                }
            }
            else {

                alert(name);
            }
        }
        //--------------------------End Function DeleteReportExercises-----------------
        //--------------------------Start Function InserReportWeights-----------------
        function InserReportWeights() {

            if ($("#<%=txtWeightLbs.ClientID%>").val() == "") {
                $("#<%=txtWeightLbs.ClientID%>").focus();
            }
            else if ($("#datepickerWeight").val() == "") {
                $("#datepickerWeight").focus();
            }
            else {
                var userid = '<%=Session["Userid"]%>';
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InserReportWeights",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($("#datepickerWeight").val()) + "','_Weight':'" + $("#<%=txtWeightLbs.ClientID%>").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        if (result.d == '10') {
                            alert('This weight is already in system on ' + $("#datepickerWeight").val());
                        }
                        else {
                            ListMyWeight();
                            $("#<%=txtWeightLbs.ClientID%>").val('');
                            //$("#datepickerWeight").val('');
                        }
                    },
                    error: function (result) {
                        alert('Can not create your weight!');
                    }
                });
            }
        }
        //--------------------------End Function InserReportWeights-----------------
        //--------------------------Start Function DeleteReportWeight-----------------
        function DeleteReportWeight(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the weight?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DeleteReportWeights",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyWeight();
                        },
                        error: function (msg) {
                            alert('Can not delete your weight!');
                        }
                    });
                }
            }
            else {

                alert(name);
            }
        }
        //--------------------------End Function DeleteReportWeight-----------------
        //--------------------------Start Function InsertReportFoodDrink---------------
        function InsertReportFoodDrink(CalorieValue, FatValue, CarbValue, ProteinValue, RecipeID) {

            var userid = '<%=Session["Userid"]%>';

            if ($("#<%=txtFoodDrink.ClientID%>").val() == "") {
                $("#<%=txtFoodDrink.ClientID%>").focus();
            }
            else if ($("#<%=txtQuantity.ClientID%>").val() == "") {
                $("#<%=txtQuantity.ClientID%>").focus();
            }
            else if ($("#ddlUnit").val() == "") {
                $("#ddlUnit").val().focus();
            }
            else if ($("#datepickerFoodDrink").val() == "") {
                $("#datepickerFoodDrink").focus();
            }
            else {
                var RecipeName = replaceAll("'", ",,", $("#<%=txtFoodDrink.ClientID%>").val());

                var Quantity = $("#<%=txtQuantity.ClientID%>").val();
                var UnitName = $("#ddlUnit").val().replace("'", ",,");
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InsertReportFoodDrink",
                    data: "{'_UserID':'" + userid + "','_CalorieName':'" + RecipeName + "','_Calorie':'" + CalorieValue + "','_Fat':'" + FatValue
                     + "','_Carb':'" + CarbValue + "','_Protein':'" + ProteinValue + "','_Quantity':'" + Quantity + "','_Unit':'" + UnitName
                     + "','_Date':'" + getformatdate($("#datepickerFoodDrink").val()) + "','_RecipeID':'" + RecipeID + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ListMyFoodIntake();
                        $("#<%=txtFoodDrink.ClientID%>").val("");
                        $("#<%=txtQuantity.ClientID%>").val("");
                        $("#ddlUnit").empty();
                        //$("#datepickerFoodDrink").val("");
                    },
                    error: function (result) {
                        alert('Can not create a eating or drinking!');
                    }
                });

            }
        }
        //--------------------------End Function InsertReportFoodDrink-----------------
        //--------------------------Start Function DelteReportFoodDrink-------------
        function DelteReportFoodDrink(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the recipe name: ' + name + '?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DelteReportFoodDrink",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyFoodIntake();
                        },
                        error: function (msg) {
                            alert('Can not delete the recipe name: ' + name + '?');
                        }
                    });
                }
            }
            else {

                alert(name);
            }
        }
        //--------------------------End Function DelteReportFoodDrink---------------
        //--------------------------Start Function InsertReportGoals---------------
        function InsertReportGoals() {

            var userid = '<%=Session["Userid"]%>';

            if ($("#txtMyCALORIES").val() == "") {
                $("#txtMyCALORIES").focus();
            }
            else if ($("#txtMyFAT").val() == "") {
                $("#txtMyFAT").focus();
            }
            else if ($("#txtMyCARB").val() == "") {
                $("#txtMyCARB").focus();
            }
            else if ($("#txtMyPROTEIN").val() == "") {
                $("#txtMyPROTEIN").focus();
            }
            else if ($("#txtMYExercise").val() == "") {
                $("#txtMYExercise").focus();
            }
            else if ($("#txtMyWeight").val() == "") {
                $("#txtMyWeight").focus();
            }
            else {

                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InsertReportGoals",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($(".datepicker").val()) + "','_Calorie':'" + $("#txtMyCALORIES").val() + "','_Fat':'" + $("#txtMyFAT").val()
                     + "','_Carb':'" + $("#txtMyCARB").val() + "','_Protein':'" + $("#txtMyPROTEIN").val() +
                      "','_Weight':'" + $("#txtMyWeight").val() + "','_Exercise':'" + $("#txtMYExercise").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        if (result.d == '10') {
                            alert('This goal is already in system on ' + new Date());
                        }
                        else {
                            ShowMainReport();
                        }
                    },
                    error: function (result) {
                        alert('Can not create goal!');
                    }
                });

            }
        }
        //--------------------------End Function InsertReportGoals-----------------
        //--------------------------Start Function EditReportGoals---------------
        function EditReportGoals() {

            var userid = '<%=Session["Userid"]%>';

            if ($("#txtMyCALORIES").val() == "") {
                $("#txtMyCALORIES").focus();
            }
            else if ($("#txtMyFAT").val() == "") {
                $("#txtMyFAT").focus();
            }
            else if ($("#txtMyCARB").val() == "") {
                $("#txtMyCARB").focus();
            }
            else if ($("#txtMyPROTEIN").val() == "") {
                $("#txtMyPROTEIN").focus();
            }
            else if ($("#txtMYExercise").val() == "") {
                $("#txtMYExercise").focus();
            }
            else if ($("#txtMyWeight").val() == "") {
                $("#txtMyWeight").focus();
            }
            else {

                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/EditReportGoals",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($("#datepicker").val()) + "','_Calorie':'" + $("#txtMyCALORIES").val() + "','_Fat':'" + $("#txtMyFAT").val()
                     + "','_Carb':'" + $("#txtMyCARB").val() + "','_Protein':'" + $("#txtMyPROTEIN").val() +
                      "','_Weight':'" + $("#txtMyWeight").val() + "','_Exercise':'" + $("#txtMYExercise").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ShowMainReport();
                    },
                    error: function (result) {
                        alert('Can not edit goal!' + getformatdate($(".datepicker").val()));
                    }
                });

            }
        }
        //--------------------------End Function EditReportGoals-----------------
        //--------------------------Start Function ShowMainReport------------------
        function ShowMainReport() {
            var userid = '<%=Session["Userid"]%>';

            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetShowMainReport",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {

                        for (var i = 0; i < data.d.length; i++) {
                            if (data.d[i].Name == 'Goal') {
                                $("#txtCalGoals").val(data.d[i].Calorie);
                                $("#txtFatGoals").val(data.d[i].Fat);
                                $("#txtCarbGoals").val(data.d[i].Carb);
                                $("#txtProteinGoals").val(data.d[i].Protein);
                                $("#txExerciseGoals").val(data.d[i].Exercise);
                                $("#txWeightGoals").val(data.d[i].Weight);
                            }
                            else if (data.d[i].Name == 'MyIntake') {
                                $("#txtMyIntakeCal").val(data.d[i].Calorie);
                                $("#txtMyIntakeFat").val(data.d[i].Fat);
                                $("#txtMyIntakeCarb").val(data.d[i].Carb);
                                $("#txtMyIntakeProtein").val(data.d[i].Protein);
                                $("#txtMyIntakeExercise").val(data.d[i].Exercise);
                                $("#txtMyIntakeWeight").val(data.d[i].Weight);
                            }
                        }
                        if (data.d.length == 0) {
                            $("#txtCalGoals").val("");
                            $("#txtFatGoals").val("");
                            $("#txtCarbGoals").val("");
                            $("#txtProteinGoals").val("");
                            $("#txExerciseGoals").val("");
                            $("#txWeightGoals").val("");
                            $("#txtMyIntakeCal").val("");
                            $("#txtMyIntakeFat").val("");
                            $("#txtMyIntakeCarb").val("");
                            $("#txtMyIntakeProtein").val("");
                            $("#txtMyIntakeExercise").val("");
                            $("#txtMyIntakeWeight").val("");
                        }
                        if (data.d.length == 1) {
                            for (var i = 0; i < data.d.length; i++) {
                                if (data.d[i].Name == 'Goal') {
                                    $("#txtCalGoals").val(data.d[i].Calorie);
                                    $("#txtFatGoals").val(data.d[i].Fat);
                                    $("#txtCarbGoals").val(data.d[i].Carb);
                                    $("#txtProteinGoals").val(data.d[i].Protein);
                                    $("#txExerciseGoals").val(data.d[i].Exercise);
                                    $("#txWeightGoals").val(data.d[i].Weight);
                                    $("#txtMyIntakeCal").val("");
                                    $("#txtMyIntakeFat").val("");
                                    $("#txtMyIntakeCarb").val("");
                                    $("#txtMyIntakeProtein").val("");
                                    $("#txtMyIntakeExercise").val("");
                                    $("#txtMyIntakeWeight").val("");
                                }
                                else if (data.d[i].Name == 'MyIntake') {
                                    $("#txtMyIntakeCal").val(data.d[i].Calorie);
                                    $("#txtMyIntakeFat").val(data.d[i].Fat);
                                    $("#txtMyIntakeCarb").val(data.d[i].Carb);
                                    $("#txtMyIntakeProtein").val(data.d[i].Protein);
                                    $("#txtMyIntakeExercise").val(data.d[i].Exercise);
                                    $("#txtMyIntakeWeight").val(data.d[i].Weight);
                                    $("#txtCalGoals").val("");
                                    $("#txtFatGoals").val("");
                                    $("#txtCarbGoals").val("");
                                    $("#txtProteinGoals").val("");
                                    $("#txExerciseGoals").val("");
                                    $("#txWeightGoals").val("");
                                }
                            }
                        }
                        if ($("#txtCalGoals").val() == "" && $("#txtFatGoals").val() == "" && $("#txtCarbGoals").val() == ""
                        && $("#txtProteinGoals").val() == "" && $("#txExerciseGoals").val() == "" && $("#txWeightGoals").val() == "") {
                            $('.btnMyGoals').attr('src', 'images/AddReports.png');
                            $('.idAddGoals').attr('src', 'images/AddReports.png');

                        }
                        else {
                            $('.btnMyGoals').attr('src', 'images/EditReports.png');

                        }

                    },
                    error: function (msg) {

                    }
                });
            }

        }
        //--------------------------End Function ShowMainReport--------------------
        function replaceAll(find, replace, str) {
            while (str.indexOf(find) > -1) {
                str = str.replace(find, replace);
            }
            return str;
        }
        function getformatdate(strdate) {
            var now = new Date(strdate);
            var Month = now.getMonth() + 1;
            var Day = now.getDate();
            var Year = now.getFullYear();

            return Month + '/' + Day + '/' + Year;
        }
        function searchKeyPress(obj) {
            var id = $(obj).attr('id');

            if (id == 'txtMyCALORIES') {
                if ($('#txtMyCALORIES').val().length > 0) {
                    $('#btnDelete').show();
                } else {
                    $('#btnDelete').hide();
                }
            }
            else if (id == 'txtMyFAT') {
                if ($('#txtMyFAT').val().length > 0) {
                    $('#btnDelete1').show();
                } else {
                    $('#btnDelete1').hide();
                }
            }
            else if (id == 'txtMyCARB') {
                if ($('#txtMyCARB').val().length > 0) {
                    $('#btnDelete2').show();
                } else {
                    $('#btnDelete2').hide();
                }
            }
            else if (id == 'txtMyPROTEIN') {
                if ($('#txtMyPROTEIN').val().length > 0) {
                    $('#btnDelete3').show();
                } else {
                    $('#btnDelete3').hide();
                }
            }
            else if (id == 'txtMYExercise') {
                if ($('#txtMYExercise').val().length > 0) {
                    $('#btnDelete4').show();
                } else {
                    $('#btnDelete4').hide();
                }
            }
            else if (id == 'txtMyWeight') {
                if ($('#txtMyWeight').val().length > 0) {
                    $('#btnDelete5').show();
                } else {
                    $('#btnDelete5').hide();
                }
            }
            else if (id == 'MainContent_txtFoodDrink') {
                if ($('#MainContent_txtFoodDrink').val().length > 0) {
                    $('#btnDelete6').show();
                } else {
                    $('#btnDelete6').hide();
                }
            }
            else if (id == 'MainContent_txtQuantity') {
                if ($('#MainContent_txtQuantity').val().length > 0) {
                    $('#btnDelete7').show();
                } else {
                    $('#btnDelete7').hide();
                }
            }
            else if (id == 'MainContent_txtWeightLbs') {
                if ($('#MainContent_txtWeightLbs').val().length > 0) {
                    $('#btnDelete8').show();
                } else {
                    $('#btnDelete8').hide();
                }
            }
            else if (id == 'MainContent_txtExerciseName') {
                if ($('#MainContent_txtExerciseName').val().length > 0) {
                    $('#btnDelete9').show();
                } else {
                    $('#btnDelete9').hide();
                }
            }
            else if (id == 'MainContent_txtExerciseCal') {
                if ($('#MainContent_txtExerciseCal').val().length > 0) {
                    $('#btnDelete10').show();
                } else {
                    $('#btnDelete10').hide();
                }
            }

        }
        function deleteTextSearch(obj) {
            var id = $(obj).attr('id');
            if (id == 'btnDelete') {
                $('#txtMyCALORIES').val('');
                $('#btnDelete').hide();
            }
            else if (id == 'btnDelete1') {
                $('#txtMyFAT').val('');
                $('#btnDelete1').hide();
            }
            else if (id == 'btnDelete2') {
                $('#txtMyCARB').val('');
                $('#btnDelete2').hide();
            }
            else if (id == 'btnDelete3') {
                $('#txtMyPROTEIN').val('');
                $('#btnDelete3').hide();
            }
            else if (id == 'btnDelete4') {
                $('#txtMYExercise').val('');
                $('#btnDelete4').hide();
            }
            else if (id == 'btnDelete5') {
                $('#txtMyWeight').val('');
                $('#btnDelete5').hide();
            }
            else if (id == 'btnDelete6') {
                $('#MainContent_txtFoodDrink').val('');
                $('#MainContent_txtQuantity').val('');
                $("#ddlUnit").empty();
                $('#btnDelete6').hide();
            }
            else if (id == 'btnDelete7') {
                $('#MainContent_txtQuantity').val('');
                $('#btnDelete7').hide();
            }
            else if (id == 'btnDelete8') {
                $('#MainContent_txtWeightLbs').val('');
                $('#btnDelete8').hide();
            }
            else if (id == 'btnDelete9') {
                $('#MainContent_txtExerciseName').val('');
                $('#btnDelete9').hide();
            }
            else if (id == 'btnDelete10') {
                $('#MainContent_txtExerciseCal').val('');
                $('#btnDelete10').hide();
            }
        }
        function InitdeleteTextSearch1() {
            if ($('#MainContent_txtWeightLbs').val().length > 0) {
                $('#btnDelete8').show();
            }
            else {
                $('#btnDelete8').hide();
            }
        }
        function InitdeleteTextSearch2() {
            if ($('#MainContent_txtExerciseName').val().length > 0) {
                $('#btnDelete9').show();
            }
            else {
                $('#btnDelete9').hide();
            }
            if ($('#MainContent_txtExerciseCal').val().length > 0) {
                $('#btnDelete10').show();
            }
            else {
                $('#btnDelete10').hide();
            }
        }
        function InitdeleteTextSearch3() {
            if ($('#MainContent_txtFoodDrink').val().length > 0) {
                $('#btnDelete6').show();
            }
            else {
                $('#btnDelete6').hide();
            }
            if ($('#MainContent_txtQuantity').val().length > 0) {
                $('#btnDelete7').show();
            }
            else {
                $('#btnDelete7').hide();
            }
        }
        function InitdeleteTextSearch() {
            if ($('#txtMyCALORIES').val().length > 0) {
                $('#btnDelete').show();
            }
            else {
                $('#btnDelete').hide();
            }
            if ($('#txtMyFAT').val().length > 0) {
                $('#btnDelete1').show();
            }
            else {
                $('#btnDelete1').hide();
            }
            if ($('#txtMyCARB').val().length > 0) {
                $('#btnDelete2').show();
            }
            else {
                $('#btnDelete2').hide();
            }
            if ($('#txtMyPROTEIN').val().length > 0) {
                $('#btnDelete3').show();
            }
            else {
                $('#btnDelete3').hide();
            }
            if ($('#txtMYExercise').val().length > 0) {
                $('#btnDelete4').show();
            }
            else {
                $('#btnDelete4').hide();
            }
            if ($('#txtMyWeight').val().length > 0) {
                $('#btnDelete5').show();
            }
            else {
                $('#btnDelete5').hide();
            }
        }
   </script>
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<br />
 <div id="content" class="Main" style="padding-top:10px">
        <div class="box_profiles04 clearfix" style="border-top-right-radius:10px;border-top-left-radius:10px">
            <div class="Food" id="idFood" style="float:left;border:0px solid #c1c1c1;width:30%;background-color:#A6A6A6;text-align:center;border-top-left-radius:10px">
               <a href="#"><img class="food3" src="images/food4.png" style="width:50px;height:50px;" alt="Food"/></a> 
            </div>
            <div class="Exercise" id="idExercise" style="float:left;border-right:2px solid #c1c1c1;border-left:2px solid #c1c1c1;;width:30%;background-color:#A6A6A6;text-align:center"  >
               <a href="#"><img class="running3" src="images/runing3.png" style="width:50px;height:50px;" alt="Exercise"/></a> 
            </div>
            <div class="Weight" id="idWeight" style="float:left;border-right:2px solid #c1c1c1;width:30%;background-color:#A6A6A6;text-align:center" >
               <a href="#"><img class="weight3" src="images/weight3.png" style="width:50px;height:50px;"  alt="Weight"/></a> 
            </div>
        </div>

         <div class="box_profiles03 clearfix">
            <div  style="float:left;border:0px solid #c1c1c1;width:25%;text-align:left;">
                 <a href="#"> <img src="images/back.png" class="Back" alt="Back" style="height:26px;width:25px;border:0px;"/></a>
            </div>
            <div  style="float:left;border-right:0px;border-left:0px;width:40%;"  >
             
              <input name="datepicker" id="datepicker" class="datepicker" type="text"  
                    size="15"  
                    style="width:100%;background-color:#375D10;border:0px;height:26px; vertical-align:top;font-size:12px;text-align: center;color:#ffffff"/>    
                         
            </div>
            <div  style="float:left;border-right:0px;width:25%;text-align:right" >
              <label style="width:100%;height:25px">&nbsp;</label>
            </div>
            <div  style="float:left;border-right:0px;width:10%;text-align:center " >
                <a href="#"> <img class="Next" src="images/next.png" alt="Next" style="height:26px;width:25px;border:0px;"/></a>
            </div>
        </div>
        <div class="box_profiles10 clearfix">
          <label style="font-size:12px;color:#000000">My Goals</label> 
        </div>

        <div class="box_profiles04 clearfix">
           <table border="0" cellspacing="0" cellpadding="0" class="table01">
                         <tr style="background-color:#A6A6A6">
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">FOOD - CAL</td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">FAT</td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">CARB</td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">PROTEIN</td> 
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">EXERCISE</td>     
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;color:#000000">WEIGHT</td>    
                             <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:10%;color:#000000"></td>            
                          </tr>
                          <tr >
                            <td style="height:30px;" align="center">

               		              <input id="txtCalGoals" class="txtCalGoals" type="text" value="" style="width: 98%;font-size:13px;height:30px;color:#000000;text-align:center;height:24px;border:0px" disabled="disabled"/>
         			                   
                            </td>
                            <td style="height:30px;" align="center">
                	          
               		              <input id="txtFatGoals" class="txtFatGoals" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			                  
                            </td>
                            <td style="height:30px;" align="center">
                	          
                		            <input id="txtCarbGoals" class="txtCarbGoals" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			             
                            </td>
                            <td style="height:30px;" align="center">
                	          
                		            <input id="txtProteinGoals" class="txtProteinGoals" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			                    
                            </td>
                             <td style="height:30px;" align="center">
                	          
                		            <input id="txExerciseGoals" class="txExerciseGoals" type="text" value="" style="width:98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			                       
                            </td>
                             <td style="height:30px;" align="center">
                	           
                		            <input id="txWeightGoals" class="txWeightGoals" type="text" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" value="" disabled="disabled"/>
         			         
                            </td>  
                             <td style="height:30px;vertical-align:middle;" align="center">
                		            <a href="#"><img id="btnMyGoals" class="btnMyGoals" src="images/AddReports.png" alt="Add" style="vertical-align: middle;"/></a>           
                            </td>
                          </tr>
                        </table>
        </div>

        <div class="box_profiles10 clearfix">
          <label style="font-size:12px;color:#000000">My Intakes</label> 
        </div>
        <div class="box_profiles04 clearfix">

            <table border="0" cellspacing="0" cellpadding="0" class="table01">
                           <tr style="background-color:#A6A6A6">
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td>
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td> 
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td>     
                            <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:15%;height:0%"></td>    
                             <td style="background-color:#A6A6A6;font-size:8px;text-align:center;width:10%;height:0%"></td>            
                          </tr>    
                          <tr >
                            <td style="height:30px;" align="center">
                	           
               		              <input id="txtMyIntakeCal" class="txtMyIntakeCal" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px;" disabled="disabled"/>
         			                       
                            </td>
                            <td style="height:30px;" align="center">
                	           
               		              <input id="txtMyIntakeFat" class="txtMyIntakeFat" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			                      
                            </td>
                            <td style="height:30px;" align="center">
                	            
                		            <input id="txtMyIntakeCarb" class="txtMyIntakeCarb" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			            
                            </td>
                            <td style="height:30px;" align="center">
                	        
                		            <input id="txtMyIntakeProtein" class="txtMyIntakeProtein" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
         			                     
                            </td>
                            <td style="height:30px;" align="center">
                	           
                		            <input id="txtMyIntakeExercise" class="txtMyIntakeExercise" type="text" value="" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" disabled="disabled"/>
                
                            </td>
                            <td style="height:30px;" align="center">
                	            
                		            <input id="txtMyIntakeWeight" class="txtMyIntakeWeight" type="text" style="width: 98%;font-size:13px;height:30px;text-align:center;height:24px;color:#000000;border:0px" value="" disabled="disabled"/>
         			                 
                            </td>
                             <td style="vertical-align:middle;height:30px;" align="center">
                	           
                		              <a href="#"><img id="btnMyEnter" src="images/AddReports.png" alt="Add" style="vertical-align: bottom;"/></a>
         			                          
                            </td> 
                          </tr>
                        </table>
                    </div>
          
       <div class="box_profiles03 clearfix">
            <div  id="ChartDiv1" class="box_profilesChildren01" style="background:#E9EAED">
	       </div>
        </div>        
 </div>


     <div id="content1" class="EnterGoals" style="margin:0 auto 0 auto;border: 0;width:98%;height:100%;">
        <div id="div2" class="message" style="border: 0">
          <div class="alert-close-goals"><img src="images/ClosePopup.png" alt="Add"/></div>
          <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your goals</div>
          <br />
          <div style="width:100%;height:100%;">
              <div class="box_profiles03 clearfix" style="border-style: solid; border-width: 1px 0px 1px 0px">
                    <table>
                             <tr>
                                 <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 5px 0px;">
                                         Calories
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 5px 0px;">
                                       <div class="cleartext" style="vertical-align: top">
                                         <input id="txtMyCALORIES" class="txtMyCALORIES" type="text" tabindex="1" value="" onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>
                	                     <input id="btnDelete" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                       </div> 
                                 </td>
                             </tr>
                             <tr>
                                <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 5px 0px;">
                                        Fat <br />(mg)
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 5px 0px;">
                                      <div class="cleartext" style="vertical-align: top">
                                        <input id="txtMyFAT" class="txtMyFAT" type="text" value="" onkeyup="searchKeyPress(this);" tabindex="2" style="width:100%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>
                                        <input id="btnDelete1" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                    </div>
                                 </td>
                             </tr>
                             <tr>
                                <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 5px 0px;">
                                        Carb <br />(mg)
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 5px 0px;">
                                    <div class="cleartext" style="vertical-align: top"> 
                                        <input id="txtMyCARB" class="txtMyCARB" type="text" value="" onkeyup="searchKeyPress(this);" tabindex="3" style="width: 100%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>
                	                    <input id="btnDelete2" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                 </div>
                                 </td>
                             </tr>
                             <tr>
                                <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 10px 0px;">
                                    Protein <br />(mg)
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 5px 0px 10px 0px;">
                                      <div class="cleartext" style="vertical-align: top">
                                        <input id="txtMyPROTEIN" class="txtMyPROTEIN" type="text" value="" onkeyup="searchKeyPress(this);" tabindex="4" style="width: 99%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>
                	                    <input id="btnDelete3" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                      </div> 
                                 </td>
                             </tr>
                             <tr style="border-style: solid; border-width: 1px 0px 1px 0px;">
                                <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 10px 0px;">
                                 Exercise <br />(cal)
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 10px 0px;">
                                      <div class="cleartext" style="vertical-align:top;">
                                         <input id="txtMYExercise"  class="txtMYExercise" type="text" tabindex="5" value="" onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>                  
                                         <input id="btnDelete4" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                </div> 
                                 </td>
                             </tr>
                             <tr>
                                <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 1px 0px;">
                                  Weight <br />(lbs or  kg)	
                                 </td>
                                 <td style="width:50%;height:40px;text-align:center;padding: 10px 0px 1px 0px;">
                                     <div class="cleartext" style="vertical-align: top">
                                         <input id="txtMyWeight" class="txtMyWeight" type="text" value="" onkeyup="searchKeyPress(this);" tabindex="7" style="width: 100%;height:30px;font-size:13px;color:#000000;border:0px;text-align:center;"/>              
                                         <input id="btnDelete5" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
                                     </div> 
                                 </td>
                             </tr>
                             <tr>
                                <td colspan='2'>
                                 	<a href="#"><img id="btnAddGoals" class="btnAddGoals" style="width:0px;height:0px;visibility:hidden" src="images/AddReports.png" alt="Add"/></a>
                                </td>
                             </tr>
                    </table>
              </div>

          </div>

       </div>
     </div>

     <div id="content2" class="EnterFoodInTakes" style="margin:0 auto 0 auto;border: 0">
        <div id="div4" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
         <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your food intakes</div>
          <br />
           <div style="width:100%;height:100%;">
           <div class="box_profiles03 clearfix" style="border-style: solid; border-width: 1px 0px 0px 0px">
                    <table> 
                            <tr>
                                 <td  style="width:100%;height:40px;text-align:center;padding: 10px 0px 5px 0px;">
                                     <div style="width:100%">
                                        <div style="width:20%;float:left" align="left">
                                            <a href="#"> <img src="images/back.png" class="Back" alt="Back" style="height:26px;width:30px;border:0px;"/></a>
                                        </div>
                                        <div style="width:60%;float:left"">
                                            <input name="datepickerFoodDrink" id="datepickerFoodDrink" class="datepicker" 
                                            type="text" value="" style="width: 100%;height:26px;font-size:12px;border:0px;background-color:#375D10;text-align: center;color:#ffffff"/> 
                                        </div>
                                        <div style="width:20%;float:left;" align="right">
                                            <a href="#"> <img src="images/next.png" class="Next" alt="Next" style="height:26px;width:25px;border:0px;"/></a>
                                        </div>
                                 
                                     </div>
                                      
                                 </td>
                            </tr>
                             <tr>     
                                 <td style="width:100%;height:40px;text-align:left;padding: 5px 0px 5px 0px;">
                                     <div style="width:100%">
                                        <div class="cleartext" style="width:90%;float:left">    
               		                      <input id="txtFoodDrink" class="suggestReport" type="text" placeholder="Enter your intake food/drinks" 
                                          runat="server" value="" onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:12px;border:0px" />
                                          <input id="btnDelete6" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
         			                    </div>    
                                        <div style="width:10%;float:left;padding-top:5px;vertical-align: middle;" 
                                             align="right">
                                            <a href="#"><img id="idAddFoodDrink" src="images/AddReports.png" alt="Add" style="height:20px;width:20px;border:0px;"/></a>
                                        </div>
                                     </div>
                                </td>
                             </tr>
                             <tr> 
                                 <td style="width:100%;height:40px;text-align:left;padding: 5px 0px 5px 0px;">
                                     <div class="cleartext" style="vertical-align: top;width:90%;float:left">
               		                    <input id="txtQuantity" type="text" class="txtQuantity" placeholder="Quantity" 
                                        runat="server"  value="" onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:12px;border:0px" />
                                        <input id="btnDelete7" class="btndeletetext" onclick="deleteTextSearch(this); return false;" type="button"/> 
         			                </div> 
                                    <div style="width:10%;float:left">&nbsp;</div>    
                                 </td>   

                             </tr>
                             <tr>
                                 <td style="width:100%;height:40px;text-align:left;padding: 5px 0px 10px 0px;">
                                        <select id="ddlUnit" style="width: 90%;height:30px;border:none; vertical-align:middle;padding:2px 0 2px 0"></select> 
                                 </td>
                             </tr>        
                    </table>
           </div>
             

            <div class="box_profiles09 clearfix"> 
                    <table id="idListFoodIntake" style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;">
                        <thead>
                            <tr  class="firstline">
                                <th style="width:44%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;"></th>
                                <th style="width:15%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;font-size:8px">FOOD - CALS</th>
                                <th style="width:12%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;font-size:8px">FAT</th>
                                <th style="width:12%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;font-size:8px">CARB</th>
                                <th style="width:12%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;font-size:8px">PROTEIN</th>
                                <th style="width:5%;height:40px;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;"></th>
                            </tr>
                        </thead>
                        <tbody>
                           
                        </tbody>
                    </table>
              </div>

           </div>
       </div>
     </div>

     <div id="content3" class="EnterWeight" style="margin:0 auto 0 auto;border: 0">
        <div id="div5" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
       <br />
       <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your weight</div>
          <br />
           <div style="width:100%;height:100%;">
                 
           <div class="box_profiles03 clearfix" style="border-style: solid; border-width: 1px 0px 0px 0px">
                    <table> 
                             <tr>
                                 <td  style="width:100%;height:40px;text-align:center;padding: 10px 0px 5px 0px;">
                                     <div style="width:100%">
                                        <div style="width:20%;float:left" align="left">
                                            <a href="#"> <img src="images/back.png" class="Back" alt="Back" style="height:26px;width:25px;border:0px;"/></a>
                                        </div>
                                        <div style="width:60%;float:left"">
                                            <input name="datepickerExercise" id="datepickerWeight" class="datepicker" type="text" value="" 
                                            style="background-color:#375D10;width: 100%;height:26px;font-size:12px;border:0px;text-align: center;color:#ffffff"/>            
                                        </div>
                                        <div style="width:20%;float:left;" align="right">
                                            <a href="#"> <img src="images/next.png" class="Next" alt="Next" style="height:26px;width:25px;border:0px;"/></a>
                                        </div>
                                 
                                     </div>
                                      
                                 </td>
                             </tr>
                             <tr> 
                                <td style="width:100%;height:40px;text-align:center;padding: 5px 0px 10px 0px;">
                                 <div style="width:100%">
                                    <div class="cleartext" style="vertical-align: top;width:90%;float:left""> 
               		                  <input id="txtWeightLbs" class="txtWeightLbs" type="text" placeholder="Enter your weight" runat="server" value=""  onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:12px;border:0px"/>   			                         
                                      <input id="btnDelete8" class="btndeletetext" onclick="deleteTextSearch(this); return false;"type="button"/> 
                                    </div>
                                        <div style="width:10%;float:left;padding-top:5px" align="right">
                                             <a href="#"><img id="idAddWeight" src="images/AddReports.png" alt="Add" style="height:20px;width:20px;border:0px;"/></a> 
                                        </div>
                                     </div> 
                                  </td>       
                             </tr>
                    </table>
           </div>
              
              <div class="box_profiles09 clearfix"> 
                    <table id="idListEnterWeight" style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;" class="table01">   
                        <tbody>
                            
                        </tbody>
                    </table>
              </div>
           </div>
       </div>
     </div>

     <div id="content4" class="EnterExercise" style="margin:0 auto 0 auto;border: 0">
        <div id="div6" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
       <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your exercises</div>
          <br />
           <div style="width:100%;height:100%;">
            <div class="box_profiles03 clearfix" style="border-style: solid; border-width: 1px 0px 0px 0px">
                     <table> 
                             <tr>
                                 <td  style="width:100%;height:40px;text-align:center;padding: 10px 0px 5px 0px;">
                                     <div style="width:100%">
                                        <div style="width:20%;float:left" align="left">
                                            <a href="#"> <img src="images/back.png" class="Back" alt="Back" style="height:26px;width:25px;border:0px;"/></a>
                                        </div>
                                        <div style="width:60%;float:left"">
                                            <input name="datepickerExercise" id="datepickerExercise"  class="datepicker" type="text" value="" 
                                            style="background-color:#375D10;width: 100%;height:26px;font-size:12px;border:0px;text-align: center;color:#ffffff"/>         
                                        </div>
                                        <div style="width:20%;float:left;" align="right">
                                            <a href="#"> <img src="images/next.png" class="Next" alt="Next" style="height:26px;width:25px;border:0px;"/></a>
                                        </div>
                                 
                                     </div>
                                      
                                 </td>
                             </tr>
                             <tr> 
                                <td style="width:100%;height:40px;text-align:center;padding: 5px 0px 5px 0px;">
                                 <div style="width:100%">
                                      <div class="cleartext" style="vertical-align: top;width:90%;float:left"">  
               		                    <input id="txtExerciseName" type="text" placeholder="Enter your exercises" runat="server"  onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:12px;border:0px"/>
         			                     <input id="btnDelete9" class="btndeletetext" onclick="deleteTextSearch(this); return false;"type="button"/> 
                                      </div>  
                                      <div style="width:10%;float:left;padding-top:5px" align="right">
                                              <a href="#"><img id="idAddExercise" src="images/AddReports.png" alt="Add" style="height:20px;width:20px;border:0px;"/></a> 
                                      </div>
                                     </div> 
                                  </td>       
                             </tr>
                             <tr>
                                <td style="width:100%;height:40px;text-align:right;padding: 10px 0px 10px 0px;">
                                     <div class="cleartext" style="vertical-align: top;width: 90%;">
               		                    <input id="txtExerciseCal" class="txtExerciseCal" type="text" value="" placeholder="Calories" runat="server"  onkeyup="searchKeyPress(this);" style="width: 100%;height:30px;font-size:12px;border:0px"/>                
                                        <input id="btnDelete10" class="btndeletetext" onclick="deleteTextSearch(this); return false;"type="button"/>  
                                    </div>
                                </td>
                             
                             </tr>
                    </table>
                  
           </div>
            
              <div class="box_profiles09 clearfix"> 
                    <table id="idListEnterExercise" style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;' class="table01">   
                        <tbody>
                          
                        </tbody>
                    </table>
              </div>
           </div>
       </div>
     </div>
      

</asp:Content>

